/*****************************************************************************
 *   Copyright 2005 Tim A Wang
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 *
 ****************************************************************************/
package com.jb.database.metamodel;

import java.sql.ResultSet;
import java.sql.SQLException;


public class Parameter extends BaseDatabaseEntity {
    String columnName;
    String procedureCatalog;
    String procedureName;
    String procedureSchema;
    String typeName;
    int dataType;
    int length;
    int precision;
    short columnType;
    short nullable;

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnType(short columnType) {
        this.columnType = columnType;
    }

    public short getColumnType() {
        return columnType;
    }

    public void setDataType(int dataType) {
        this.dataType = dataType;
    }

    public int getDataType() {
        return dataType;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public int getLength() {
        return length;
    }

    public void setNullable(short nullable) {
        this.nullable = nullable;
    }

    public short getNullable() {
        return nullable;
    }

    public void setPrecision(int precision) {
        this.precision = precision;
    }

    public int getPrecision() {
        return precision;
    }

    public void setProcedureCatalog(String procedureCatalog) {
        this.procedureCatalog = procedureCatalog;
    }

    public String getProcedureCatalog() {
        return procedureCatalog;
    }

    public void setProcedureName(String procedureName) {
        this.procedureName = procedureName;
    }

    public String getProcedureName() {
        return procedureName;
    }

    public void setProcedureSchema(String procedureSchema) {
        this.procedureSchema = procedureSchema;
    }

    public String getProcedureSchema() {
        return procedureSchema;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getTypeName() {
        return typeName;
    }

    public void assign(ResultSet crs) throws SQLException {
    }

    /*
    PROCEDURE_CAT String => procedure catalog (may be null)
    PROCEDURE_SCHEM String => procedure schema (may be null)
    PROCEDURE_NAME String => procedure name reserved for future use reserved for future use reserved for future use


    COLUMN_NAME String => column/parameter name
    COLUMN_TYPE Short => kind of column/parameter:
    procedureColumnUnknown - nobody knows
    procedureColumnIn - IN parameter
    procedureColumnInOut - INOUT parameter
    procedureColumnOut - OUT parameter
    procedureColumnReturn - procedure return value
    procedureColumnResult - result column in ResultSet

    DATA_TYPE int => SQL type from java.sql.Types
    TYPE_NAME String => SQL type name, for a UDT type the type name is fully qualified

    PRECISION int => precision
    LENGTH int => length in bytes of data SCALE short => scale RADIX short => radix
    NULLABLE short => can it contain NULL.
    procedureNoNulls - does not allow NULL values
    procedureNullable - allows NULL values
    procedureNullableUnknown - nullability unknown
    */
}
